﻿//======================================================
//==     (c)2008 aspxcms inc by NeTCMS v1.0              ==
//==          Forum:bbs.aspxcms.com                   ==
//==         Website:www.aspxcms.com                  ==
//======================================================
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using NetCMS.DALFactory;
using NetCMS.Model;

namespace NetCMS.Content
{
    public class Stat
    {
        private IStat dal;
        public Stat()
        {
            dal = NetCMS.DALFactory.DataAccess.CreateStat();
        }
        public DataTable sel()
        {
            return dal.sel();
        }
        public string sel_statInfoById(string id)
        {
            return dal.sel_statInfoById(id);
        }
        public bool del_statSql(string ID,int flag)
        {
            return dal.del_statSql(ID, flag);
        }
        public void Str_InSql(StatParamInfo sp)
        {
            dal.Str_InSql(sp);
        }
        public int Stat_Sql()
        {
            return dal.Stat_Sql();
        }
        public void del_statInfoStr(string CheckboxArray,int flag)
        {
            dal.del_statInfoStr(CheckboxArray,flag);
        }
        public bool del_statInfo(int flag)
        {
            return dal.del_statInfo(flag);
        }
        public int sel_statInfo(string Str_statid,int flag)
        {
            return dal.sel_statInfo(Str_statid,flag);
        }
        public int insert_statInfo(string Str_statid, string Str_Classname, string SiteID)
        {
            return dal.insert_statInfo(Str_statid, Str_Classname, SiteID);
        }
        public int Str_UpdateSql(string Str_ClassnameE, string id)
        {
            return dal.Str_UpdateSql(Str_ClassnameE, id);
        }
        public int del_Stat(int flag)
        {
            return dal.del_Stat(flag);
        }
        public DataTable sel_Stat(string viewid, string SiteID,int flag)
        {
            return dal.sel_Stat(viewid, SiteID,flag);
        }
        public DataTable sel_statVip(DateTime newtime, string viewid, string SiteID)
        {
            return dal.sel_statVip(newtime, viewid, SiteID);
        }
        public DataTable sel_yearMonth(int vyear, string viewid, string SiteID,int flag)
        {
            return dal.sel_yearMonth(vyear, viewid, SiteID,flag);
        }
        public DataTable sel_statCount(int thehour, string vtime, string viewid, string SiteID)
        {
            return dal.sel_statCount(thehour, vtime, viewid, SiteID);
        }
        public DataTable sel_vhourcon(int vhour, int vday, int vmonth, int vyear, string viewid, string SiteID)
        {
            return dal.sel_vhourcon(vhour, vday, vmonth, vyear, viewid, SiteID);
        }
        public DataTable sel_vdaycon(string strtheday, string strthetday, string viewid, string SiteID)
        {
            return dal.sel_vdaycon(strtheday, strthetday, viewid, SiteID);
        }
        public DataTable sel_statById(string strdatetwelve, string viewid, string SiteID,int flag)
        {
            return dal.sel_statById(strdatetwelve, viewid, SiteID,flag);
        }

        #region 前台调用
        public DataTable sel_StatParamInfo()
        {
            return dal.sel_StatParamInfo();
        }
        public DataTable sel_Vip(DateTime newtime)
        {
            return dal.sel_Vip(newtime);
        }
        public void Add(StatInfo info)
        {
            dal.Add(info);
        }
        public DataTable sel_stat_content(string statidz)
        {
            return dal.sel_stat_content(statidz);
        }
        public void add_statContent(string vdatee, string starttimee, string highttimee, string statidz, string SiteID)
        {
            dal.add_statContent(vdatee, starttimee, highttimee, statidz, SiteID);
        }
        public void Update(int today, int yesterday, string content_data, int all, int heigh, string heightime, string strclassid, string siteID, string strclassids)
        {
            dal.Update(today, yesterday, content_data, all, heigh, heightime, strclassid, siteID, strclassids);
        }
        #endregion
    }
}